package com.ntschy.bt.entity.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ntschy.bt.entity.enums.BtDeclareStatusEnum;
import com.ntschy.bt.entity.valid.BtDeclareGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author ymj
 */
@Data
@ApiModel(description = "专项申报新增更新dto")
public class BtDeclareAddUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 申报ID
     */
    @ApiModelProperty(value = "申报ID")
    @NotBlank(message = "申报ID不能为空",groups = {BtDeclareGroups.Update.class})
    @Length(min = 36, max = 36, message = "申报ID长度不合法",groups = BtDeclareGroups.Update.class)
    private String id;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空",groups = {BtDeclareGroups.Add.class,BtDeclareGroups.Update.class})
    @Length(min = 2, max = 100, message = "标题长度必须为2-10位", groups = { BtDeclareGroups.Add.class, BtDeclareGroups.Update.class })
    private String title;

    /**
     * 申报开始时间
     */
    @ApiModelProperty(value = "申报开始时间")
    @NotBlank(message = "申报开始时间不能为空",groups = {BtDeclareGroups.Add.class,BtDeclareGroups.Update.class})
    private String startTime;

    /**
     * 申报结束时间
     */
    @ApiModelProperty(value = "申报结束时间")
    private String endTime;

    /**
     * 文本内容
     */
    @ApiModelProperty(value = "文本内容")
    private String content;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private String createTime;

    /**
     * 创建人ID
     */
    @ApiModelProperty(value = "创建人ID")
    @NotBlank(message = "创建人ID不能为空",groups = {BtDeclareGroups.Add.class,BtDeclareGroups.Update.class})
    private String createUserID;

    /**
     * 创建人姓名
     */
    @ApiModelProperty(value = "创建人姓名")
    @NotBlank(message = "创建人姓名不能为空",groups = {BtDeclareGroups.Add.class,BtDeclareGroups.Update.class})
    private String createUserName;

    /**
     * 发布人ID
     */
    @ApiModelProperty(value = "发布人ID")
    private String publishUserID;

    /**
     * 发布人姓名
     */
    @ApiModelProperty(value = "发布人姓名")
    private String publishUserName;

    /**
     * 发布时间
     */
    @ApiModelProperty(value = "发布时间")
    private String publishTime;

    /**
     * 状态 1-待发布 2-已发布
     */
    @ApiModelProperty(value = "状态 1-待发布 2-已发布")
    @NotNull(message = "状态不能为空",groups = {BtDeclareGroups.Add.class,BtDeclareGroups.Update.class})
    private BtDeclareStatusEnum status;

    /**
     * 是否删除 0-正常 1-已删除
     */
    @TableField("DelFlag")
    @ApiModelProperty(value = "是否删除 0-正常 1-已删除")
    private Long delFlag;
}
